﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ModelLibrary;

namespace WebC
{
    public partial class buy_resultselect : clsBaseForm
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            loadInfo();
        }

        int iCompanyId
        {
            get
            {
                return Convert.ToInt32(Request["companyid"]);
            }
        }

        int iContractId
        {
            get
            {
                return Convert.ToInt32(Request["id"]);
            }
        }

        private void loadInfo()
        {
            BuyDevice buy = null;
            DataTable dt = null;
            try
            {
                buy = new BuyDevice();
                dt = buy.getContractInfo(iCompanyId, iContractId);
            }
            catch (Exception ex)
            {
                errorUrl(ex.ToString());
            }
            finally
            {
                if (buy != null)
                {
                    buy.Dispose();
                }
            }
            rpttblInfo.DataSource = dt;
            rpttblInfo.DataBind();
        }
    }
}